
let p = new Promise( ( resolve, reject )=>{
    console.log( nickname ); // ReferenceError
} );

/*
p.then(
        (...params) => console.log( ...params) ,
        error => console.log( error.name , error.message )
      );
*/

/*
// p.then( (...params) => console.log( ...params) , undefined );
let p1 = p.then( (...params) => console.log( ...params) );

// p.then( undefined , error => console.log( error ) );
let p2 = p.catch( error => console.log( error.name , error.message ) );
console.log( p1 == p2 );
*/

p.then( (...params) => console.log( ...params) )
 .catch( error => console.log( error.name , error.message ) )
 .finally( value => console.log( value ) );
